package com.zqu.service.impl;

import com.zqu.mapper.ClientMapper;
import com.zqu.pojo.Client;
import com.zqu.service.ClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClientServiceImpl implements ClientService {

    @Autowired(required = false)
    private ClientMapper clientMapper;

    @Override
    public Client selectClientById(long id) {
        return clientMapper.selectTById(id);
    }

    @Override
    public List<Client> selectList(Client client) {
        return clientMapper.selectList(client);
    }

    @Override
    public boolean insertClient(Client client) {
        return clientMapper.insertT(client)>0;
    }

    @Override
    public boolean updateClient(Client client) {
        return clientMapper.updateT(client)>0;
    }

    @Override
    public boolean deleteClient(long id) {
        return clientMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteClientByIds(String[] ids) {
        return clientMapper.deleteTByIds(ids)>0;
    }
}
